package com.lagou.dao;

import com.lagou.pojo.PositionDetail;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

public interface PositionDetailDao extends JpaRepository<PositionDetail, Long>, JpaSpecificationExecutor<PositionDetail> {
	/**
	 * sql
	 *
	 * @param id
	 * @return
	 */
	@Query(value = "select p.id,p.name,p.salary,p.city,pd.description from position p join position_detail pd on p.id=pd.pid where pd.id=?1", nativeQuery = true)
	public Object findPositionDetailById(Long id);
}
